package com.samshow.core.server;

import com.samshow.core.listener.ScreenListener;
import onbon.bx05.Bx5GServer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

/**
 * Created by niwb on 2017/2/21.
 */
@Component
public class BXServer {
    private Logger log = LoggerFactory.getLogger(this.getClass());
    @Autowired
    private ScreenListener screenListener;


    public void init() {
        try {
            Bx5GServer bx5GServer = new Bx5GServer("SERVER-01", 9001);
            bx5GServer.addListener(screenListener);
        } catch (Exception e) {
            log.error("Bx5GServer init ERROR", e);
        }
    }
}
